<?php
// create custom plugin settings menu
add_action('admin_menu', 'omr_create_menu');

function omr_create_menu() {

	//create new top-level menu
	add_menu_page('Help Guide Section', 'Help Guide', 'administrator', __FILE__, 'omr_settings_page', 'favicon.ico', '3');
        
	//call register settings function
	add_action( 'admin_init', 'register_mysettings' );
}

function register_mysettings() {
	//register our settings
	register_setting( 'omr-settings-group', 'omr_tracking_code' );
}

function omr_settings_page() {
?>
<div class="wrap">

<script language="javascript" type="text/javascript">
<!--
function popitup(url) {
	newwindow=window.open(url,'name','height=400,width=600');
	if (window.focus) {newwindow.focus()}
	return false;
}

// -->
</script>

<h2>Silicon Solar Help Guide</h2>

<p style="font-style:italic;font-size:14px;">The Silicon Solar Help Guide is here to help you use all of the functions and features that we have built into the backend and frontend of the Silicon Solar online store. To get started, just click on the tab below of the &quot;category&quot; that your question (or what you are trying to do) would fit into, and look through the list of questions.</p>
<p style="font-style:italic;font-size:14px;">If you are unable to find your question / guide, try using &quot;CTRL+F&quot; and searching for a word that you think would be in the title of the solution / question.</p>
<p style="font-style:italic;font-size:14px;">If all else fails, please ask Matt B or Tom M for assistance!</p>
<?php
		if( isset( $_GET[ 'tab' ] ) ) {
			$active_tab = isset( $_GET[ 'tab' ] ) ? $_GET[ 'tab' ] : 'product_help';
		} // end if
	?>
	<h2 class="nav-tab-wrapper">
		<a href="?page=home/silicons/public_html/wp-content/themes/siliconsolar/customfunctions/help-tabs.php&tab=product_help" class="nav-tab <?php echo $active_tab == 'product_help' ? 'nav-tab-active' : ''; ?>">Products</a>
		<a href="?page=home/silicons/public_html/wp-content/themes/siliconsolar/customfunctions/help-tabs.php&tab=category_help" class="nav-tab <?php echo $active_tab == 'category_help' ? 'nav-tab-active' : ''; ?>">Categories</a>
        <a href="?page=home/silicons/public_html/wp-content/themes/siliconsolar/customfunctions/help-tabs.php&tab=orders_help" class="nav-tab <?php echo $active_tab == 'orders_help' ? 'nav-tab-active' : ''; ?>">Orders</a>
        <a href="?page=home/silicons/public_html/wp-content/themes/siliconsolar/customfunctions/help-tabs.php&tab=docsimages_help" class="nav-tab <?php echo $active_tab == 'docsimages_help' ? 'nav-tab-active' : ''; ?>">Docs / Images</a>
        <a href="?page=home/silicons/public_html/wp-content/themes/siliconsolar/customfunctions/help-tabs.php&tab=customtype_help" class="nav-tab <?php echo $active_tab == 'customtype_help' ? 'nav-tab-active' : ''; ?>">Brands / Landing Pages</a>
        <a href="?page=home/silicons/public_html/wp-content/themes/siliconsolar/customfunctions/help-tabs.php&tab=other_help" class="nav-tab <?php echo $active_tab == 'other_help' ? 'nav-tab-active' : ''; ?>">Other</a>
  </h2>
    
    <?php
    if( $active_tab == 'product_help' ) {
				include '/home/silicons/public_html/wp-content/themes/siliconsolar/admin-product-help-tab.php';
			} elseif ($active_tab == 'category_help') {
				include '/home/silicons/public_html/wp-content/themes/siliconsolar/admin-category-help-tab.php';
			} elseif ($active_tab == 'orders_help') {
				include '/home/silicons/public_html/wp-content/themes/siliconsolar/admin-orders-help-tab.php';
			} elseif ($active_tab == 'docimages_help') {
				include '/home/silicons/public_html/wp-content/themes/siliconsolar/admin-docimages-help-tab.php';
			} elseif ($active_tab == 'customtype_help') {
				include '/home/silicons/public_html/wp-content/themes/siliconsolar/admin-customtype-help-tab.php';
			} else {
				include '/home/silicons/public_html/wp-content/themes/siliconsolar/admin-other-help-tab.php';
			}
	?>

</div>
<?php } ?>